#clk
create_clock -period 20.000 -name sys_clk -waveform {0.000 10.000} [get_ports sys_clk]
set_property IOSTANDARD LVCMOS33 [get_ports sys_clk]
set_property PACKAGE_PIN U22 [get_ports sys_clk]

#rstn
set_property IOSTANDARD LVCMOS33 [get_ports rst_n]
set_property PACKAGE_PIN H19 [get_ports rst_n]

#DA
set_property IOSTANDARD LVCMOS33 [get_ports {m_axis_data_tdata_unsigned[13]}]
set_property IOSTANDARD LVCMOS33 [get_ports {m_axis_data_tdata_unsigned[12]}]
set_property IOSTANDARD LVCMOS33 [get_ports {m_axis_data_tdata_unsigned[11]}]
set_property IOSTANDARD LVCMOS33 [get_ports {m_axis_data_tdata_unsigned[10]}]
set_property IOSTANDARD LVCMOS33 [get_ports {m_axis_data_tdata_unsigned[9]}]
set_property IOSTANDARD LVCMOS33 [get_ports {m_axis_data_tdata_unsigned[8]}]
set_property IOSTANDARD LVCMOS33 [get_ports {m_axis_data_tdata_unsigned[7]}]
set_property IOSTANDARD LVCMOS33 [get_ports {m_axis_data_tdata_unsigned[6]}]
set_property IOSTANDARD LVCMOS33 [get_ports {m_axis_data_tdata_unsigned[5]}]
set_property IOSTANDARD LVCMOS33 [get_ports {m_axis_data_tdata_unsigned[4]}]
set_property IOSTANDARD LVCMOS33 [get_ports {m_axis_data_tdata_unsigned[3]}]
set_property IOSTANDARD LVCMOS33 [get_ports {m_axis_data_tdata_unsigned[2]}]
set_property IOSTANDARD LVCMOS33 [get_ports {m_axis_data_tdata_unsigned[1]}]
set_property IOSTANDARD LVCMOS33 [get_ports {m_axis_data_tdata_unsigned[0]}]
set_property IOSTANDARD LVCMOS33 [get_ports dac_clk]

set_property PACKAGE_PIN W25 [get_ports dac_clk]
set_property PACKAGE_PIN AC24 [get_ports {m_axis_data_tdata_unsigned[13]}]
set_property PACKAGE_PIN AB24 [get_ports {m_axis_data_tdata_unsigned[12]}]
set_property PACKAGE_PIN Y21 [get_ports {m_axis_data_tdata_unsigned[11]}]
set_property PACKAGE_PIN W21 [get_ports {m_axis_data_tdata_unsigned[10]}]
set_property PACKAGE_PIN AA25 [get_ports {m_axis_data_tdata_unsigned[9]}]
set_property PACKAGE_PIN Y25 [get_ports {m_axis_data_tdata_unsigned[8]}]
set_property PACKAGE_PIN Y23 [get_ports {m_axis_data_tdata_unsigned[7]}]
set_property PACKAGE_PIN Y22 [get_ports {m_axis_data_tdata_unsigned[6]}]
set_property PACKAGE_PIN W23 [get_ports {m_axis_data_tdata_unsigned[5]}]
set_property PACKAGE_PIN V23 [get_ports {m_axis_data_tdata_unsigned[4]}]
set_property PACKAGE_PIN V21 [get_ports {m_axis_data_tdata_unsigned[3]}]
set_property PACKAGE_PIN U21 [get_ports {m_axis_data_tdata_unsigned[2]}]
set_property PACKAGE_PIN T25 [get_ports {m_axis_data_tdata_unsigned[1]}]
set_property PACKAGE_PIN T24 [get_ports {m_axis_data_tdata_unsigned[0]}]


#AD
set_property IOSTANDARD LVCMOS33 [get_ports adc_clk]
set_property IOSTANDARD LVCMOS33 [get_ports {adc_input[11]}]
set_property IOSTANDARD LVCMOS33 [get_ports {adc_input[10]}]
set_property IOSTANDARD LVCMOS33 [get_ports {adc_input[9]}]
set_property IOSTANDARD LVCMOS33 [get_ports {adc_input[8]}]
set_property IOSTANDARD LVCMOS33 [get_ports {adc_input[7]}]
set_property IOSTANDARD LVCMOS33 [get_ports {adc_input[6]}]
set_property IOSTANDARD LVCMOS33 [get_ports {adc_input[5]}]
set_property IOSTANDARD LVCMOS33 [get_ports {adc_input[4]}]
set_property IOSTANDARD LVCMOS33 [get_ports {adc_input[3]}]
set_property IOSTANDARD LVCMOS33 [get_ports {adc_input[2]}]
set_property IOSTANDARD LVCMOS33 [get_ports {adc_input[1]}]
set_property IOSTANDARD LVCMOS33 [get_ports {adc_input[0]}]
set_property IOSTANDARD LVCMOS33 [get_ports bdc_clk]
set_property IOSTANDARD LVCMOS33 [get_ports {bdc_input[11]}]
set_property IOSTANDARD LVCMOS33 [get_ports {bdc_input[10]}]
set_property IOSTANDARD LVCMOS33 [get_ports {bdc_input[9]}]
set_property IOSTANDARD LVCMOS33 [get_ports {bdc_input[8]}]
set_property IOSTANDARD LVCMOS33 [get_ports {bdc_input[7]}]
set_property IOSTANDARD LVCMOS33 [get_ports {bdc_input[6]}]
set_property IOSTANDARD LVCMOS33 [get_ports {bdc_input[5]}]
set_property IOSTANDARD LVCMOS33 [get_ports {bdc_input[4]}]
set_property IOSTANDARD LVCMOS33 [get_ports {bdc_input[3]}]
set_property IOSTANDARD LVCMOS33 [get_ports {bdc_input[2]}]
set_property IOSTANDARD LVCMOS33 [get_ports {bdc_input[1]}]
set_property IOSTANDARD LVCMOS33 [get_ports {bdc_input[0]}]

set_property PACKAGE_PIN H4 [get_ports adc_clk]
set_property PACKAGE_PIN J4 [get_ports {adc_input[0]}]
set_property PACKAGE_PIN H1 [get_ports {adc_input[1]}]
set_property PACKAGE_PIN H2 [get_ports {adc_input[2]}]
set_property PACKAGE_PIN G9 [get_ports {adc_input[3]}]
set_property PACKAGE_PIN H9 [get_ports {adc_input[4]}]
set_property PACKAGE_PIN L2 [get_ports {adc_input[5]}]
set_property PACKAGE_PIN M2 [get_ports {adc_input[6]}]
set_property PACKAGE_PIN N3 [get_ports {adc_input[7]}]
set_property PACKAGE_PIN N2 [get_ports {adc_input[8]}]
set_property PACKAGE_PIN K5 [get_ports {adc_input[9]}]
set_property PACKAGE_PIN L5 [get_ports {adc_input[10]}]
set_property PACKAGE_PIN L4 [get_ports {adc_input[11]}]

set_property PACKAGE_PIN P3 [get_ports bdc_clk]
set_property PACKAGE_PIN R3 [get_ports {bdc_input[0]}]
set_property PACKAGE_PIN J1 [get_ports {bdc_input[1]}]
set_property PACKAGE_PIN K1 [get_ports {bdc_input[2]}]
set_property PACKAGE_PIN M5 [get_ports {bdc_input[3]}]
set_property PACKAGE_PIN M6 [get_ports {bdc_input[4]}]
set_property PACKAGE_PIN T3 [get_ports {bdc_input[5]}]
set_property PACKAGE_PIN T4 [get_ports {bdc_input[6]}]
set_property PACKAGE_PIN P5 [get_ports {bdc_input[7]}]
set_property PACKAGE_PIN P6 [get_ports {bdc_input[8]}]
set_property PACKAGE_PIN M1 [get_ports {bdc_input[9]}]
set_property PACKAGE_PIN N1 [get_ports {bdc_input[10]}]
set_property PACKAGE_PIN P1 [get_ports {bdc_input[11]}]

#vga
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[17]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[18]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[19]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[21]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[22]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[23]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[20]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[16]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[15]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[14]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[13]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[11]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[12]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[10]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[9]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[8]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[7]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[6]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[5]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[4]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[3]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[2]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[1]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb[0]}]

set_property PACKAGE_PIN R26 [get_ports {rgb[0]}]
set_property PACKAGE_PIN K25 [get_ports {rgb[1]}]
set_property PACKAGE_PIN K22 [get_ports {rgb[2]}]
set_property PACKAGE_PIN N26 [get_ports {rgb[3]}]
set_property PACKAGE_PIN L22 [get_ports {rgb[4]}]
set_property PACKAGE_PIN K23 [get_ports {rgb[5]}]
set_property PACKAGE_PIN M26 [get_ports {rgb[6]}]
set_property PACKAGE_PIN M24 [get_ports {rgb[7]}]
set_property PACKAGE_PIN J26 [get_ports {rgb[8]}]
set_property PACKAGE_PIN J25 [get_ports {rgb[9]}]
set_property PACKAGE_PIN G21 [get_ports {rgb[10]}]
set_property PACKAGE_PIN G20 [get_ports {rgb[11]}]
set_property PACKAGE_PIN H22 [get_ports {rgb[12]}]
set_property PACKAGE_PIN H21 [get_ports {rgb[13]}]
set_property PACKAGE_PIN J21 [get_ports {rgb[14]}]
set_property PACKAGE_PIN K21 [get_ports {rgb[15]}]
set_property PACKAGE_PIN D25 [get_ports {rgb[16]}]
set_property PACKAGE_PIN E25 [get_ports {rgb[17]}]
set_property PACKAGE_PIN G26 [get_ports {rgb[18]}]
set_property PACKAGE_PIN H26 [get_ports {rgb[19]}]
set_property PACKAGE_PIN E23 [get_ports {rgb[20]}]
set_property PACKAGE_PIN F23 [get_ports {rgb[21]}]
set_property PACKAGE_PIN F22 [get_ports {rgb[22]}]
set_property PACKAGE_PIN G22 [get_ports {rgb[23]}]

set_property PACKAGE_PIN E26 [get_ports hsync]
set_property IOSTANDARD LVCMOS33 [get_ports hsync]

set_property PACKAGE_PIN D26 [get_ports vsync]
set_property IOSTANDARD LVCMOS33 [get_ports vsync]

set_property PACKAGE_PIN K26 [get_ports rgb_valid]
set_property IOSTANDARD LVCMOS33 [get_ports rgb_valid]

set_property PACKAGE_PIN L23 [get_ports vga_clk]
set_property IOSTANDARD LVCMOS33 [get_ports vga_clk]



#test
set_property IOSTANDARD LVCMOS33 [get_ports freq_mode_top]
set_property PACKAGE_PIN AC26 [get_ports freq_mode_top]
set_property IOSTANDARD LVCMOS33 [get_ports load_on_off_switch]
set_property PACKAGE_PIN AB26 [get_ports load_on_off_switch]